<template>
    <div id='map' class="map w-100 h-100"></div>
</template>

<script>
export default {
    mounted() {
        this.initmap()
    },
    methods: {
        initmap() {
            this.$mapboxgl.accessToken = 'pk.eyJ1Ijoic2FtOTAyOSIsImEiOiJjbGJscTByeTMwYTAxM3dyMHNleWt6NXc0In0.YgT8bxaStfgw9ZAwNCpWDA';

            var map = new this.$mapboxgl.Map({
                container: "map",
                style: "mapbox://styles/mapbox/dark-v9",
                center: [104.07, 30.67],
                zoom: 12,
                pitch: 60,  //地图倾斜角度 默认值为 0，范围为 0 ~ 85
            });
        }
    }
}  
</script>

<style lang="scss" scoped>
.map{
    overflow:hidden;
    overflow-x: auto;
}
</style>